/*   1:    */ package org.intellij.lang.regexp;
/*   2:    */ 
/*   3:    */

import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.lang.ParserDefinition;
import com.intellij.lang.ParserDefinition.SpaceRequirements;
import com.intellij.lang.PsiParser;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.project.Project;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.TokenType;
import com.intellij.psi.tree.IElementType;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;
import org.intellij.lang.regexp.psi.impl.*;
import org.jetbrains.annotations.NotNull;

import java.util.EnumSet;

/*   4:    */
/*   5:    */
/*   6:    */
/*   7:    */
/*   8:    */
/*   9:    */
/*  10:    */
/*  11:    */
/*  12:    */
/*  13:    */
/*  14:    */
/*  15:    */
/*  16:    */
/*  17:    */
/*  18:    */
/*  19:    */
/*  20:    */
/*  21:    */
/*  22:    */
/*  23:    */
/*  24:    */
/*  25:    */
/*  26:    */
/*  27:    */
/*  28:    */
/*  29:    */
/*  30:    */
/*  31:    */
/*  32:    */
/*  33:    */
/*  34:    */
/*  35:    */
/*  36:    */ 
/*  37:    */ public class RegExpParserDefinition
/*  38:    */   implements ParserDefinition
/*  39:    */ {
/*  40: 37 */   private static final TokenSet a = TokenSet.create(new IElementType[] { RegExpTT.COMMENT });
/*  41:    */   
/*  42:    */   @NotNull
/*  43:    */   public Lexer createLexer(Project paramProject)
/*  44:    */   {
/*  45: 41 */     void tmp13_10 = new RegExpLexer(EnumSet.of(RegExpCapability.NESTED_CHARACTER_CLASSES));
/*  46: 41 */     if (tmp13_10 == null) {
/*  47: 41 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createLexer" }));
/*  48:    */     }
/*  49: 41 */     return tmp13_10;
/*  50:    */   }
/*  51:    */   
/*  52:    */   public PsiParser createParser(Project paramProject)
/*  53:    */   {
/*  54: 45 */     return new RegExpParser();
/*  55:    */   }
/*  56:    */   
/*  57:    */   public IFileElementType getFileNodeType()
/*  58:    */   {
/*  59: 49 */     return RegExpElementTypes.REGEXP_FILE;
/*  60:    */   }
/*  61:    */   
/*  62:    */   @NotNull
/*  63:    */   public TokenSet getWhitespaceTokens()
/*  64:    */   {
/*  65: 55 */     TokenSet tmp25_22 = TokenSet.create(new IElementType[] { RegExpTT.QUOTE_BEGIN, RegExpTT.QUOTE_END, TokenType.WHITE_SPACE });
/*  66: 55 */     if (tmp25_22 == null) {
/*  67: 55 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "getWhitespaceTokens" }));
/*  68:    */     }
/*  69: 55 */     return tmp25_22;
/*  70:    */   }
/*  71:    */   
/*  72:    */   @NotNull
/*  73:    */   public TokenSet getStringLiteralElements()
/*  74:    */   {
/*  75: 60 */     TokenSet tmp3_0 = TokenSet.EMPTY;
/*  76: 60 */     if (tmp3_0 == null) {
/*  77: 60 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "getStringLiteralElements" }));
/*  78:    */     }
/*  79: 60 */     return tmp3_0;
/*  80:    */   }
/*  81:    */   
/*  82:    */   @NotNull
/*  83:    */   public TokenSet getCommentTokens()
/*  84:    */   {
/*  85: 65 */     TokenSet tmp3_0 = a;
/*  86: 65 */     if (tmp3_0 == null) {
/*  87: 65 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "getCommentTokens" }));
/*  88:    */     }
/*  89: 65 */     return tmp3_0;
/*  90:    */   }
/*  91:    */   
/*  92:    */   @NotNull
/*  93:    */   public PsiElement createElement(ASTNode paramASTNode)
/*  94:    */   {
/*  95: 70 */     IElementType localIElementType = paramASTNode.getElementType();
/*  96: 71 */     if (localIElementType == RegExpElementTypes.PATTERN)
/*  97:    */     {
/*  98: 72 */       void tmp22_19 = new RegExpPatternImpl(paramASTNode);
/*  99: 72 */       if (tmp22_19 == null) {
/* 100: 72 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 101:    */       }
/* 102: 72 */       return tmp22_19;
/* 103:    */     }
/* 104: 73 */     if (localIElementType == RegExpElementTypes.BRANCH)
/* 105:    */     {
/* 106: 74 */       void tmp72_69 = new RegExpBranchImpl(paramASTNode);
/* 107: 74 */       if (tmp72_69 == null) {
/* 108: 74 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 109:    */       }
/* 110: 74 */       return tmp72_69;
/* 111:    */     }
/* 112: 75 */     if (localIElementType == RegExpElementTypes.SIMPLE_CLASS)
/* 113:    */     {
/* 114: 76 */       void tmp122_119 = new RegExpSimpleClassImpl(paramASTNode);
/* 115: 76 */       if (tmp122_119 == null) {
/* 116: 76 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 117:    */       }
/* 118: 76 */       return tmp122_119;
/* 119:    */     }
/* 120: 77 */     if (localIElementType == RegExpElementTypes.CLASS)
/* 121:    */     {
/* 122: 78 */       void tmp172_169 = new RegExpClassImpl(paramASTNode);
/* 123: 78 */       if (tmp172_169 == null) {
/* 124: 78 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 125:    */       }
/* 126: 78 */       return tmp172_169;
/* 127:    */     }
/* 128: 79 */     if (localIElementType == RegExpElementTypes.CHAR_RANGE)
/* 129:    */     {
/* 130: 80 */       void tmp222_219 = new RegExpCharRangeImpl(paramASTNode);
/* 131: 80 */       if (tmp222_219 == null) {
/* 132: 80 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 133:    */       }
/* 134: 80 */       return tmp222_219;
/* 135:    */     }
/* 136: 81 */     if (localIElementType == RegExpElementTypes.CHAR)
/* 137:    */     {
/* 138: 82 */       void tmp272_269 = new RegExpCharImpl(paramASTNode);
/* 139: 82 */       if (tmp272_269 == null) {
/* 140: 82 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 141:    */       }
/* 142: 82 */       return tmp272_269;
/* 143:    */     }
/* 144: 83 */     if (localIElementType == RegExpElementTypes.GROUP)
/* 145:    */     {
/* 146: 84 */       void tmp322_319 = new RegExpGroupImpl(paramASTNode);
/* 147: 84 */       if (tmp322_319 == null) {
/* 148: 84 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 149:    */       }
/* 150: 84 */       return tmp322_319;
/* 151:    */     }
/* 152: 85 */     if (localIElementType == RegExpElementTypes.PROPERTY)
/* 153:    */     {
/* 154: 86 */       void tmp372_369 = new RegExpPropertyImpl(paramASTNode);
/* 155: 86 */       if (tmp372_369 == null) {
/* 156: 86 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 157:    */       }
/* 158: 86 */       return tmp372_369;
/* 159:    */     }
/* 160: 87 */     if (localIElementType == RegExpElementTypes.SET_OPTIONS)
/* 161:    */     {
/* 162: 88 */       void tmp422_419 = new RegExpSetOptionsImpl(paramASTNode);
/* 163: 88 */       if (tmp422_419 == null) {
/* 164: 88 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 165:    */       }
/* 166: 88 */       return tmp422_419;
/* 167:    */     }
/* 168: 89 */     if (localIElementType == RegExpElementTypes.OPTIONS)
/* 169:    */     {
/* 170: 90 */       void tmp472_469 = new RegExpOptionsImpl(paramASTNode);
/* 171: 90 */       if (tmp472_469 == null) {
/* 172: 90 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 173:    */       }
/* 174: 90 */       return tmp472_469;
/* 175:    */     }
/* 176: 91 */     if (localIElementType == RegExpElementTypes.BACKREF)
/* 177:    */     {
/* 178: 92 */       void tmp522_519 = new RegExpBackrefImpl(paramASTNode);
/* 179: 92 */       if (tmp522_519 == null) {
/* 180: 92 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 181:    */       }
/* 182: 92 */       return tmp522_519;
/* 183:    */     }
/* 184: 93 */     if (localIElementType == RegExpElementTypes.CLOSURE)
/* 185:    */     {
/* 186: 94 */       void tmp572_569 = new RegExpClosureImpl(paramASTNode);
/* 187: 94 */       if (tmp572_569 == null) {
/* 188: 94 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 189:    */       }
/* 190: 94 */       return tmp572_569;
/* 191:    */     }
/* 192: 95 */     if (localIElementType == RegExpElementTypes.QUANTIFIER)
/* 193:    */     {
/* 194: 96 */       void tmp622_619 = new RegExpQuantifierImpl(paramASTNode);
/* 195: 96 */       if (tmp622_619 == null) {
/* 196: 96 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 197:    */       }
/* 198: 96 */       return tmp622_619;
/* 199:    */     }
/* 200: 97 */     if (localIElementType == RegExpElementTypes.BOUNDARY)
/* 201:    */     {
/* 202: 98 */       void tmp672_669 = new RegExpBoundaryImpl(paramASTNode);
/* 203: 98 */       if (tmp672_669 == null) {
/* 204: 98 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 205:    */       }
/* 206: 98 */       return tmp672_669;
/* 207:    */     }
/* 208: 99 */     if (localIElementType == RegExpElementTypes.INTERSECTION)
/* 209:    */     {
/* 210:100 */       void tmp722_719 = new RegExpIntersectionImpl(paramASTNode);
/* 211:100 */       if (tmp722_719 == null) {
/* 212:100 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 213:    */       }
/* 214:100 */       return tmp722_719;
/* 215:    */     }
/* 216:101 */     if (localIElementType == RegExpElementTypes.PY_NAMED_GROUP_REF)
/* 217:    */     {
/* 218:102 */       void tmp772_769 = new RegExpPyNamedGroupRefImpl(paramASTNode);
/* 219:102 */       if (tmp772_769 == null) {
/* 220:102 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 221:    */       }
/* 222:102 */       return tmp772_769;
/* 223:    */     }
/* 224:103 */     if (localIElementType == RegExpElementTypes.PY_COND_REF)
/* 225:    */     {
/* 226:104 */       void tmp822_819 = new RegExpPyCondRefImpl(paramASTNode);
/* 227:104 */       if (tmp822_819 == null) {
/* 228:104 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 229:    */       }
/* 230:104 */       return tmp822_819;
/* 231:    */     }
/* 232:107 */     void tmp865_862 = new ASTWrapperPsiElement(paramASTNode);
/* 233:107 */     if (tmp865_862 == null) {
/* 234:107 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/intellij/lang/regexp/RegExpParserDefinition", "createElement" }));
/* 235:    */     }
/* 236:107 */     return tmp865_862;
/* 237:    */   }
/* 238:    */   
/* 239:    */   public PsiFile createFile(FileViewProvider paramFileViewProvider)
/* 240:    */   {
/* 241:111 */     return new RegExpFile(paramFileViewProvider, RegExpLanguage.INSTANCE);
/* 242:    */   }
/* 243:    */   
/* 244:    */   public ParserDefinition.SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode paramASTNode1, ASTNode paramASTNode2)
/* 245:    */   {
/* 246:115 */     return ParserDefinition.SpaceRequirements.MUST_NOT;
/* 247:    */   }
/* 248:    */ }



/* Location:           E:\idea\

 * Qualified Name:     org.intellij.lang.regexp.RegExpParserDefinition

 * JD-Core Version:    0.7.0.1

 */